package repository

import (
	"context"
	"ruoyi-go-echo-ddd/internal/domain/model"
	"ruoyi-go-echo-ddd/internal/infrastructure/http/request"
)

type SysDeptRepository interface {
	Save(ctx context.Context, dept *model.Dept) (*model.Dept, error)
	Update(ctx context.Context, dept *model.Dept) (*model.Dept, error)
	SelectById(ctx context.Context, id int64) (*model.Dept, error)
	CheckDept(ctx context.Context, deptId int64) (bool, error)
	BatchSave(ctx context.Context, list []*model.Dept) ([]int64, error)
	BatchSaveByList(ctx context.Context, list []*request.DeptInsert) ([]int64, error)
	SelectDeptList(ctx context.Context, param *request.DeptPageParam) ([]*model.Dept, error)
	SelectPage(ctx context.Context, param *request.DeptPageParam) ([]*model.Dept, int64, int64, error)
	BatchDelete(ctx context.Context, ids []any) (int64, error)
	SelectListByDept(ctx context.Context, dept *model.Dept) ([]*model.Dept, error)
	BuildDeptTree(list []*model.Dept) ([]*model.Dept, error)
	BuildDeptTreeSelect(list []*model.Dept) []*model.TreeSelect
	SelectListByRoleId(ctx context.Context, roleId int64) ([]int64, error)
	SelectAll(ctx context.Context) ([]*model.Dept, error)
}
